home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Nave / monochrome.swf / scripts / frame_10 / PlaceObject2_464_357 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Encoding:
Text File  |  2005-08-26  |  941 b   |  39 lines

  1. onClipEvent(enterFrame){
  2.    if(_name != "shipLT")
  3.    {
  4.       xspeed = speed * Math.sin((_rotation * -1 + 180) * 0.017453292519943295);
  5.       yspeed = speed * Math.cos((_rotation * -1 + 180) * 0.017453292519943295);
  6.       _rotation = _rotation + 5;
  7.       _Y = _Y + sp;
  8.       if(_X < -100 || _X > 650 || _Y < -100 || _Y > 500 || _root.rem == true)
  9.       {
  10.          removeMovieClip(this);
  11.       }
  12.       var i = 0;
  13.       while(i <= 20)
  14.       {
  15.          if(sh.harea.hitTest(_root["hmn" + i]))
  16.          {
  17.             life -= _root["hmn" + i].dmg;
  18.             sh.play();
  19.             removeMovieClip(_root["hmn" + i]);
  20.          }
  21.          i++;
  22.       }
  23.       if(_root.ship.sh.hitTest(sh.harea))
  24.       {
  25.          play();
  26.          _root.ship.play();
  27.       }
  28.       if(life <= 0)
  29.       {
  30.          play();
  31.       }
  32.       yy = random(20);
  33.       if(yy == 0 && _Y > 50)
  34.       {
  35.          _root.fire2(this);
  36.       }
  37.    }
  38. }
  39.